﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>twoway</title>

    <script src="../bindingssamples.js"></script>

    <!-- WinJSContrib.Core references -->
    <script src="/Scripts/jquery-2.1.1.js"></script>
    <script src="/scripts/winjscontrib/jquery.mcnext.WinJS.js"></script>
    <script src="/scripts/winjscontrib/mcnext.ui.utils.js"></script>
    <script src="/scripts/winjscontrib/mcnext.ui.bindings.js"></script>
    <script src="/scripts/winjscontrib/mcnext.ui.twowaybindings.js"></script>

    <link href="twoway.css" rel="stylesheet" />
    <script src="twoway.js"></script>
</head>
<body>
    <div class="twoway fragment">
        <header aria-label="Header content" role="banner">
            <h1 class="titlearea win-type-ellipsis">
                <span class="pagetitle">two way binding</span>
            </h1>
            <div class="codelink" data-codepage="/pages/bindings/twoway/twoway"><span class="symbol">&#xE160;</span><span class="text">show me the code !</span></div>
        </header>
        <section class="desc-screen" aria-label="Main content" role="main">
            <div class="bloc-description">
                <p>Two way bindings allows you to bind input from user back to your objects.</p>
                <p></p>
            </div>
            <div class="bloc-content">
                <div class="split">
                    <div>
                        <p><span data-win-bind="innerText : firstName"></span> <span data-win-bind="innerText : lastName"></span></p>
                        <p><span data-win-bind="innerText : mail"></span></p>
                        <p><span data-win-bind="innerText : phone"></span></p>
                    </div>
                    <div class="mcn-dataform form-vertical">
                        <p>
                            <label>First name</label>
                            <input type="text" data-win-bind="value : firstName  MCNEXT.Bindings.twoWayOnChange" />
                        </p>
                        <p>
                            <label>Last name</label>
                            <input type="text" data-win-bind="value : lastName  MCNEXT.Bindings.twoWayOnChange" />
                        </p>
                        <p>
                            <label>email</label>
                            <input type="email" data-win-bind="value : mail  MCNEXT.Bindings.twoWayOnChange" />
                        </p>
                        <p>
                            <label>phone</label>
                            <input type="tel" data-win-bind="value : phone  MCNEXT.Bindings.twoWayOnChange" />
                        </p>
                    </div>
                </div>
            </div>
        </section>
    </div>
</body>
</html>
